using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Progress_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Progress);
            args = new Type[]{};
            method = type.GetMethod("Dispose", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Dispose_0);
            args = new Type[]{typeof(UnityEngine.AssetBundleCreateRequest)};
            method = type.GetMethod("Play", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Play_1);
            args = new Type[]{typeof(System.Single)};
            method = type.GetMethod("Update", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Update_2);

            field = type.GetField("PlayOver", flag);
            app.RegisterCLRFieldGetter(field, get_PlayOver_0);
            app.RegisterCLRFieldSetter(field, set_PlayOver_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_PlayOver_0, AssignFromStack_PlayOver_0);
            field = type.GetField("Schedule", flag);
            app.RegisterCLRFieldGetter(field, get_Schedule_1);
            app.RegisterCLRFieldSetter(field, set_Schedule_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Schedule_1, AssignFromStack_Schedule_1);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Progress());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Progress[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* Dispose_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Progress instance_of_this_method = (huqiang.Progress)typeof(huqiang.Progress).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Dispose();

            return __ret;
        }

        static StackObject* Play_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.AssetBundleCreateRequest @ab = (UnityEngine.AssetBundleCreateRequest)typeof(UnityEngine.AssetBundleCreateRequest).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Progress instance_of_this_method = (huqiang.Progress)typeof(huqiang.Progress).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Play(@ab);

            return __ret;
        }

        static StackObject* Update_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @time = *(float*)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Progress instance_of_this_method = (huqiang.Progress)typeof(huqiang.Progress).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Update(@time);

            return __ret;
        }


        static object get_PlayOver_0(ref object o)
        {
            return ((huqiang.Progress)o).PlayOver;
        }

        static StackObject* CopyToStack_PlayOver_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Progress)o).PlayOver;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_PlayOver_0(ref object o, object v)
        {
            ((huqiang.Progress)o).PlayOver = (System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest>)v;
        }

        static StackObject* AssignFromStack_PlayOver_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest> @PlayOver = (System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest>)typeof(System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.Progress)o).PlayOver = @PlayOver;
            return ptr_of_this_method;
        }

        static object get_Schedule_1(ref object o)
        {
            return ((huqiang.Progress)o).Schedule;
        }

        static StackObject* CopyToStack_Schedule_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Progress)o).Schedule;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Schedule_1(ref object o, object v)
        {
            ((huqiang.Progress)o).Schedule = (System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest>)v;
        }

        static StackObject* AssignFromStack_Schedule_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest> @Schedule = (System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest>)typeof(System.Action<huqiang.Progress, UnityEngine.AssetBundleCreateRequest>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.Progress)o).Schedule = @Schedule;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Progress();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
